package cn.collin.commons.utils;

/**
 * String util method
 * 
 * @author collin.code@gmail.com
 * 
 */
public class StringUtils {

	/**
	 * transform string array to string with split string
	 * 
	 * @param str
	 *            string array
	 * @param splitStr
	 *            the split string
	 * @return a string splited with a split string
	 */
	public static String arrayToString(String str[], String splitStr) {
		String result = "";
		for (int i = 0; i < str.length; i++) {
			result += splitStr + str[i];
		}
		if (result.length() > 0) {
			result = result.substring(splitStr.length());
		}
		return result;
	}
}
